package com.mibox.common.ui;

import android.content.Intent;
import android.provider.Settings;

import com.mibox.common.bean.SettingBean;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.Map;

public class SystemPrefActivity extends BaseEntryActivity {

    @Override
    protected void addPageEntries(LinkedList<SettingBean> entries) {
        HashMap<String, String> actionEntry = new LinkedHashMap<>();
        actionEntry.put("WLAN设置", Settings.ACTION_WIFI_SETTINGS);
        actionEntry.put("蓝牙设置", Settings.ACTION_BLUETOOTH_SETTINGS);
        actionEntry.put("无线设置", Settings.ACTION_WIRELESS_SETTINGS);
        actionEntry.put("显示设置", Settings.ACTION_DISPLAY_SETTINGS);
        actionEntry.put("存储设置", Settings.ACTION_INTERNAL_STORAGE_SETTINGS);
        actionEntry.put("应用设置", Settings.ACTION_APPLICATION_SETTINGS);
        actionEntry.put("语言设置", Settings.ACTION_LOCALE_SETTINGS);
        actionEntry.put("声音设置", Settings.ACTION_SOUND_SETTINGS);
        actionEntry.put("日期设置", Settings.ACTION_DATE_SETTINGS);
        actionEntry.put("开发者设置", Settings.ACTION_APPLICATION_DEVELOPMENT_SETTINGS);
        actionEntry.put("关于", Settings.ACTION_DEVICE_INFO_SETTINGS);
        for (Map.Entry<String, String> entry : actionEntry.entrySet()) {
            entries.add(new SettingBean(entry.getKey(), () -> startActivity(new Intent(entry.getValue()))));
        }
    }
}
